package triangle.datastructures;

import java.util.*;
import java.util.HashSet;

public class HashMapVector<T, S> extends HashMap<T, Vector<S>>{

	public Vector<S> put(T key, S doc)
	{
		if (!this.containsKey(key))
			this.put(key, new Vector<S>());
		this.get(key).add(doc);
		return get(key);
	}
	
	
	public String toString()
	{
		String stringify = "";
		for (T key : super.keySet())
		{
			stringify += "" + key + ":" + this.get(key).toString() + "\n";
		}
		return stringify;
	}
}
